﻿#ifndef TASK_ROW_WIDGET_H
#define TASK_ROW_WIDGET_H

#include <QWidget>
#include <QTimer>

namespace Ui {
class PlanListItemWidget;
}

class PlanListItemWidget : public QWidget
{
    Q_OBJECT

public:
    explicit PlanListItemWidget(QWidget *parent = nullptr);
    ~PlanListItemWidget();
    QString text();
    void setText(QString text);
    void setUuid(const QString &uuid);
    QString getUuid() const;
    QSize size();

private:
    void initUi();
    void initEvents();

private slots:
    void onTextChanged();

signals:
    void textChanged(PlanListItemWidget* item);
    void heightChanged(int height);
    void menuTriggered(PlanListItemWidget* item);

private:
    Ui::PlanListItemWidget *ui;
    QString                 m_uuid;
    QTimer                 *m_timer;
};

#endif // TASK_ROW_WIDGET_H
